Repository navigation
Conversation
ISO 11783-3:2026 5.9.4.5 added the Role of Sender in byte 3 of TP.Conn_Abort. A received abort now closes only the session of its role, and both when the role is not specified. Our aborts send the role instead of FF. Fixes Open-Agriculture#957 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #957, reported by @sujandumaru.
ISO 11783-3:2026 5.9.4.5 added a "Role of Sender" to
TP.Conn_Abort, in byte 3 bits 1 to 2. It says which of two TP connections to close when the same PGN goes both ways between the same two CFs:00: the abort comes from the originating CF, the one that sent the TP.CM_RTS01: the abort comes from the receiving CF, the one that sent the TP.CM_CTS11: not specified. The CF "shall terminate established TP connections for the indicated PG with the CFs that sent the TP.Conn_Abort message"The standard also says "The 'Role of Sender' shall not be set to any value other than 00₂ or 01₂".
Receiving:
process_abort()now reads the role.00closes only the session the abort sender sends to us.01closes only the session we send to it.11and the reserved10close both, as before. A device built to an earlier edition sends this byte asFF, so nothing changes for it.Sending:
send_abort()takes the role, with bits 3 to 8 sent as 1.abort_session()takes it from the session's direction.FD).FC).Before, byte 3 was always
FF, which reads as11. For devices built to earlier editions byte 3 is reserved, so they ignore the new value.ETP isn't changed, because
ETP.Conn_Abortstill has bytes 3 to 5 reserved in the 2026 edition.Tests:
AbortClosesOnlyTheSessionOfItsRoleOfSendersets up two sessions of the same PGN in opposite directions. It checks which one stays open forFC,FD,FEandFF.FF.🤖 Generated with Claude Code